<template>
    <el-cascader v-model="pid" :options="tableList" :props="propstag" clearable @change="changeVal">
    </el-cascader>
</template>
<script>
export default {
    data() {
        return {
            pid: '',
            tableList: [],
            propstag: {
                value: 'id',
                label: 'name',
                children: 'children',
                checkStrictly: true
            },
        }
    },
    created() {
        this.tableList = this.$store.state.cascade.buildingData
        console.log(3333, this.tableList);
    },
    methods: {
        changeVal(val) {
            // console.log(val);
            this.$store.commit('cascade/setBuilding', val)
        },
    }
}
</script>
<style lang="less" scoped>
</style>